package com.shisfish.library.Impl;

import java.util.List;
import java.util.Map;

import org.springframework.context.ApplicationContext;

import com.shisfish.library.Inter.IBookSingleInter;
import com.shisfish.library.Model.BookSingle;
import com.shisfish.library.Utils.Global.GetACXmlUtils;

public class BookSingleImpl implements IBookSingleInter {

	private ApplicationContext ac = GetACXmlUtils.getACXml();
	private IBookSingleInter mapper = (IBookSingleInter) ac.getBean("bookSingleMapper");
	
	@Override
	public int insertOne(BookSingle t) {
		// TODO Auto-generated method stub
		return mapper.insertOne(t);
	}

	@Override
	public int insertAll(List<BookSingle> list) {
		// TODO Auto-generated method stub
		return mapper.insertAll(list);
	}

	@Override
	public int updateOne(BookSingle t) {
		// TODO Auto-generated method stub
		return mapper.updateOne(t);
	}

	@Override
	public int updateAll(List<BookSingle> list) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<BookSingle> selectById(int id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<BookSingle> selectByKey(String key) {
		// TODO Auto-generated method stub
		return mapper.selectByKey(key);
	}

	@Override
	public int countAll() {
		// TODO Auto-generated method stub
		return mapper.countAll();
	}

	@Override
	public List<BookSingle> selectAll() {
		// TODO Auto-generated method stub
		return mapper.selectAll();
	}

	@Override
	public int deleteOneById(int id) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteAllById(List<?> ids) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int deleteOneByKey(String key) {
		// TODO Auto-generated method stub
		return mapper.deleteOneByKey(key);
	}

	@Override
	public int deleteAllByKey(List<?> keys) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int insertSingleMessage(BookSingle bookSingle) {
		// TODO Auto-generated method stub
		return mapper.insertSingleMessage(bookSingle);
	}

	@Override
	public List<BookSingle> selectBookSM(String barCode) {
		// TODO Auto-generated method stub
		return mapper.selectBookSM(barCode);
	}

	@Override
	public List<BookSingle> selectByISBN(String isbn) {
		// TODO Auto-generated method stub
		return mapper.selectByISBN(isbn);
	}

	@Override
	public List<Map<String, Object>> selectByDate(String choDate,
			int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectByDate(choDate, currentPage, pageSize);
	}

	@Override
	public List<Map<String, Object>> adderLogByDate(String choDate,
			int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.adderLogByDate(choDate, currentPage, pageSize);
	}

	@Override
	public List<Map<String, Object>> adderLogByDateAdder(String idadmin,
			String choDate, int currentPage, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.adderLogByDateAdder(idadmin, choDate, currentPage, pageSize);
	}

	@Override
	public int countByDate(String choDate) {
		// TODO Auto-generated method stub
		return mapper.countByDate(choDate);
	}

	@Override
	public int countAdderLogByDate(String choDate) {
		// TODO Auto-generated method stub
		return mapper.countAdderLogByDate(choDate);
	}

	@Override
	public int countAdderLogByDateAdder(String idadmin, String choDate) {
		// TODO Auto-generated method stub
		return mapper.countAdderLogByDateAdder(idadmin, choDate);
	}

	@Override
	public List<Map<String, Object>> selectByBarCode(String barCode) {
		// TODO Auto-generated method stub
		return mapper.selectByBarCode(barCode);
	}

	public int countNewAdd(int type) {
		// TODO Auto-generated method stub
		return mapper.countNewAdd(type);
	}

	public List<Map<String, Object>> selectNewAddPage(int type, int beginIndex, int pageSize) {
		// TODO Auto-generated method stub
		return mapper.selectNewAddPage(type, beginIndex, pageSize);
	}

	public int countByState(int state) {
		// TODO Auto-generated method stub
		return mapper.countByState(state);
	}

	public int countByTypeState(int type, int state) {
		// TODO Auto-generated method stub
		return mapper.countByTypeState(type, state);
	}

	@Override
	public BookSingle selectBarCode(String barCode) {
		// TODO Auto-generated method stub
		return mapper.selectBarCode(barCode);
	}

}
